home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2203 < prev    next >
Mailbox/MIME Entity  |  1996-08-06  |  2.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ISO-8859 text default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 65 72 | 69 6e 65 77 73 2e 65 72 |Path: er|inews.er|
|00000010| 69 63 73 73 6f 6e 2e 73 | 65 21 75 73 65 6e 65 74 |icsson.s|e!usenet|
|00000020| 0a 46 72 6f 6d 3a 20 41 | 6d 65 6e 74 69 41 20 3c |.From: A|mentiA <|
|00000030| 45 74 78 6d 62 61 61 40 | 6d 6d 63 64 31 2e 65 72 |Etxmbaa@|mmcd1.er|
|00000040| 69 63 73 73 6f 6e 2e 73 | 65 3e 0a 4e 65 77 73 67 |icsson.s|e>.Newsg|
|00000050| 72 6f 75 70 73 3a 20 63 | 6f 6d 70 2e 6c 61 6e 67 |roups: c|omp.lang|
|00000060| 2e 63 2b 2b 0a 53 75 62 | 6a 65 63 74 3a 20 52 65 |.c++.Sub|ject: Re|
|00000070| 3a 20 50 72 6f 62 6c 65 | 6d 20 77 69 74 68 20 53 |: Proble|m with S|
|00000080| 45 45 4b 47 0a 44 61 74 | 65 3a 20 54 75 65 2c 20 |EEKG.Dat|e: Tue, |
|00000090| 31 36 20 4a 61 6e 20 31 | 39 39 36 20 31 34 3a 31 |16 Jan 1|996 14:1|
|000000a0| 38 3a 33 30 20 2d 30 38 | 30 30 0a 4f 72 67 61 6e |8:30 -08|00.Organ|
|000000b0| 69 7a 61 74 69 6f 6e 3a | 20 45 72 69 63 73 73 6f |ization:| Ericsso|
|000000c0| 6e 20 54 65 6c 65 63 6f | 6d 20 41 42 0a 4d 65 73 |n Teleco|m AB.Mes|
|000000d0| 73 61 67 65 2d 49 44 3a | 20 3c 33 30 46 43 32 34 |sage-ID:| <30FC24|
|000000e0| 33 36 2e 36 36 36 46 40 | 6d 6d 63 64 31 2e 65 72 |36.666F@|mmcd1.er|
|000000f0| 69 63 73 73 6f 6e 2e 73 | 65 3e 0a 52 65 66 65 72 |icsson.s|e>.Refer|
|00000100| 65 6e 63 65 73 3a 20 3c | 44 4b 76 70 41 6e 2e 4d |ences: <|DKvpAn.M|
|00000110| 42 36 40 69 6e 74 65 72 | 2e 4e 4c 2e 6e 65 74 3e |B6@inter|.NL.net>|
|00000120| 0a 4e 4e 54 50 2d 50 6f | 73 74 69 6e 67 2d 48 6f |.NNTP-Po|sting-Ho|
|00000130| 73 74 3a 20 6d 6d 63 64 | 31 65 2e 65 72 69 63 73 |st: mmcd|1e.erics|
|00000140| 73 6f 6e 2e 73 65 0a 4d | 69 6d 65 2d 56 65 72 73 |son.se.M|ime-Vers|
|00000150| 69 6f 6e 3a 20 31 2e 30 | 0a 43 6f 6e 74 65 6e 74 |ion: 1.0|.Content|
|00000160| 2d 54 79 70 65 3a 20 74 | 65 78 74 2f 70 6c 61 69 |-Type: t|ext/plai|
|00000170| 6e 3b 20 63 68 61 72 73 | 65 74 3d 69 73 6f 2d 38 |n; chars|et=iso-8|
|00000180| 38 35 39 2d 31 0a 43 6f | 6e 74 65 6e 74 2d 54 72 |859-1.Co|ntent-Tr|
|00000190| 61 6e 73 66 65 72 2d 45 | 6e 63 6f 64 69 6e 67 3a |ansfer-E|ncoding:|
|000001a0| 20 38 62 69 74 0a 58 2d | 4d 61 69 6c 65 72 3a 20 | 8bit.X-|Mailer: |
|000001b0| 4d 6f 7a 69 6c 6c 61 20 | 32 2e 30 62 33 20 28 57 |Mozilla |2.0b3 (W|
|000001c0| 69 6e 31 36 3b 20 49 29 | 0a 54 6f 3a 20 22 50 65 |in16; I)|.To: "Pe|
|000001d0| 74 65 72 20 48 2e 4a 2e | 20 76 61 6e 20 64 65 72 |ter H.J.| van der|
|000001e0| 20 4b 61 6d 70 22 20 3c | 76 64 6b 61 6d 70 40 69 | Kamp" <|vdkamp@i|
|000001f0| 6e 74 65 72 2e 6e 6c 2e | 6e 65 74 3e 0a 0a 50 65 |nter.nl.|net>..Pe|
|00000200| 74 65 72 20 48 2e 4a 2e | 20 76 61 6e 20 64 65 72 |ter H.J.| van der|
|00000210| 20 4b 61 6d 70 20 77 72 | 6f 74 65 3a 0a 3e 20 0a | Kamp wr|ote:.> .|
|00000220| 3e 20 48 65 6c 6c 6f 20 | 61 6c 6c 2c 0a 3e 20 0a |> Hello |all,.> .|
|00000230| 3e 20 49 20 68 61 76 65 | 20 70 72 6f 62 6c 65 6d |> I have| problem|
|00000240| 73 20 77 69 74 68 20 73 | 65 65 6b 67 2e 20 49 6e |s with s|eekg. In|
|00000250| 20 6d 79 20 70 72 6f 67 | 72 61 6d 20 49 20 68 61 | my prog|ram I ha|
|00000260| 76 65 20 74 77 6f 20 66 | 75 6e 63 74 69 6f 6e 73 |ve two f|unctions|
|00000270| 3a 20 6f 6e 65 20 72 65 | 61 64 73 20 61 0a 3e 20 |: one re|ads a.> |
|00000280| 66 69 6c 65 20 73 65 71 | 75 65 6e 74 69 61 6c 2c |file seq|uential,|
|00000290| 20 74 68 65 20 6f 74 68 | 65 72 20 72 65 61 64 73 | the oth|er reads|
|000002a0| 20 74 68 65 20 66 69 6c | 65 20 72 61 6e 64 6f 6d | the fil|e random|
|000002b0| 2e 0a 3e 20 43 6f 64 65 | 20 66 6f 72 20 66 75 6e |..> Code| for fun|
|000002c0| 63 74 69 6f 6e 20 6f 6e | 65 3a 0a 3e 20 20 63 68 |ction on|e:.> ch|
|000002d0| 61 72 20 2a 73 74 61 74 | 69 6f 6e 73 66 69 6c 65 |ar *stat|ionsfile|
|000002e0| 20 3d 20 22 64 3a 5c 5c | 73 74 61 74 69 6f 6e 73 | = "d:\\|stations|
|000002f0| 2e 64 61 74 22 3b 0a 3e | 20 20 73 74 61 74 69 6f |.dat";.>| statio|
|00000300| 6e 73 2e 6f 70 65 6e 28 | 73 74 61 74 69 6f 6e 73 |ns.open(|stations|
|00000310| 66 69 6c 65 2c 20 69 6f | 73 3a 3a 69 6e 29 3b 0a |file, io|s::in);.|
|00000320| 3e 20 20 73 74 61 74 69 | 6f 6e 73 2e 67 65 74 6c |> stati|ons.getl|
|00000330| 69 6e 65 28 72 65 63 6f | 72 64 2c 72 65 63 6f 72 |ine(reco|rd,recor|
|00000340| 64 6c 65 6e 67 74 65 29 | 3b 0a 3e 20 20 77 68 69 |dlengte)|;.> whi|
|00000350| 6c 65 20 28 21 73 74 61 | 74 69 6f 6e 73 2e 65 6f |le (!sta|tions.eo|
|00000360| 66 28 29 29 0a 3e 20 20 | 7b 20 2e 2e 2e 2e 0a 3e |f()).> |{ .....>|
|00000370| 20 20 20 20 73 74 61 74 | 69 6f 6e 73 2e 67 65 74 | stat|ions.get|
|00000380| 6c 69 6e 65 28 72 65 63 | 6f 72 64 2c 72 65 63 6f |line(rec|ord,reco|
|00000390| 72 64 6c 65 6e 67 74 65 | 29 3b 0a 3e 20 20 7d 0a |rdlengte|);.> }.|
|000003a0| 3e 20 20 73 74 61 74 69 | 6f 6e 73 2e 63 6c 6f 73 |> stati|ons.clos|
|000003b0| 65 28 29 3b 0a 3e 20 20 | 73 74 61 74 69 6f 6e 73 |e();.> |stations|
|000003c0| 2e 63 6c 65 61 72 28 69 | 6f 73 3a 3a 67 6f 6f 64 |.clear(i|os::good|
|000003d0| 62 69 74 29 3b 0a 3e 20 | 0a 3e 20 54 68 69 73 20 |bit);.> |.> This |
|000003e0| 77 6f 72 6b 73 20 66 69 | 6e 65 2e 0a 3e 20 0a 3e |works fi|ne..> .>|
|000003f0| 20 43 6f 64 65 20 66 6f | 72 20 66 75 6e 63 74 69 | Code fo|r functi|
|00000400| 6f 6e 20 74 77 6f 3a 0a | 3e 20 20 63 68 61 72 20 |on two:.|> char |
|00000410| 2a 73 74 61 74 69 6f 6e | 73 66 69 6c 65 20 3d 20 |*station|sfile = |
|00000420| 22 64 3a 5c 5c 73 74 61 | 74 69 6f 6e 73 2e 64 61 |"d:\\sta|tions.da|
|00000430| 74 22 3b 0a 3e 20 20 73 | 74 61 74 69 6f 6e 73 2e |t";.> s|tations.|
|00000440| 6f 70 65 6e 28 73 74 61 | 74 69 6f 6e 73 66 69 6c |open(sta|tionsfil|
|00000450| 65 2c 20 69 6f 73 3a 3a | 69 6e 20 7c 20 69 6f 73 |e, ios::|in | ios|
|00000460| 3a 3a 62 69 6e 61 72 79 | 29 3b 0a 3e 20 20 73 74 |::binary|);.> st|
|00000470| 61 74 69 6f 6e 73 2e 73 | 65 65 6b 67 28 30 2c 20 |ations.s|eekg(0, |
|00000480| 69 6f 73 3a 3a 65 6e 64 | 29 3b 0a 3e 20 0a 3e 20 |ios::end|);.> .> |
|00000490| 56 69 61 20 74 68 65 20 | 64 65 62 75 67 67 65 72 |Via the |debugger|
|000004a0| 20 49 20 63 61 6e 20 73 | 65 65 20 74 68 61 74 20 | I can s|ee that |
|000004b0| 74 68 65 20 66 69 6c 65 | 20 69 73 20 6f 70 65 6e |the file| is open|
|000004c0| 65 64 20 63 6f 72 72 65 | 63 74 6c 79 2c 20 62 75 |ed corre|ctly, bu|
|000004d0| 74 20 49 20 67 65 74 20 | 61 6e 0a 3e 20 47 50 46 |t I get |an.> GPF|
|000004e0| 20 6f 6e 20 73 65 65 6b | 67 2e 0a 0a 49 73 6e 27 | on seek|g...Isn'|
|000004f0| 74 20 74 68 65 20 66 69 | 6c 65 20 72 65 63 72 65 |t the fi|le recre|
|00000500| 61 74 65 64 20 6f 6e 20 | 74 68 65 20 22 73 74 61 |ated on |the "sta|
|00000510| 74 69 6f 6e 73 2e 6f 70 | 65 6e 22 20 6c 69 6e 65 |tions.op|en" line|
|00000520| 3f 0a 61 6e 64 20 69 6e | 20 74 68 61 74 20 63 61 |?.and in| that ca|
|00000530| 73 65 20 69 73 20 69 74 | 20 70 6f 73 73 69 62 6c |se is it| possibl|
|00000540| 65 20 74 6f 20 67 6f 20 | 74 6f 20 74 68 65 20 65 |e to go |to the e|
|00000550| 6e 64 20 6f 66 20 69 74 | 2e 0a 49 20 6b 6e 6f 77 |nd of it|..I know|
|00000560| 20 49 27 76 65 20 75 73 | 65 64 20 22 73 65 65 6b | I've us|ed "seek|
|00000570| 67 28 30 2c 20 69 6f 73 | 3a 3a 65 6e 64 29 22 20 |g(0, ios|::end)" |
|00000580| 6c 6f 61 64 73 20 6f 66 | 20 74 69 6d 65 73 2e 20 |loads of| times. |
|00000590| 62 75 74 20 74 68 65 20 | 6f 6e 6c 79 20 0a 64 69 |but the |only .di|
|000005a0| 66 66 65 72 65 6e 63 65 | 73 20 49 20 63 61 6e 20 |fference|s I can |
|000005b0| 66 69 6e 64 20 69 73 20 | 74 68 61 74 20 49 20 68 |find is |that I h|
|000005c0| 61 76 65 20 22 69 6f 73 | 3a 3a 6e 6f 63 72 65 61 |ave "ios|::nocrea|
|000005d0| 74 65 20 7c 20 69 6f 73 | 3a 3a 69 6e 20 7c 20 69 |te | ios|::in | i|
|000005e0| 6f 73 3a 3a 6f 75 74 20 | 0a 7c 20 69 6f 73 3a 3a |os::out |.| ios::|
|000005f0| 62 69 6e 61 72 79 22 20 | 77 68 65 6e 20 49 20 6f |binary" |when I o|
|00000600| 70 65 6e 20 69 74 2e 2e | 2e 0a 0a 48 6f 70 65 20 |pen it..|...Hope |
|00000610| 79 6f 75 20 73 6f 6c 76 | 65 20 69 74 20 3a 27 29 |you solv|e it :')|
|00000620| 0a 0a 2d 2d 20 0a 0a 2e | 2e 2e 2e 2e 2e 2e 2e 2e |..-- ...|........|
|00000630| 2e 2e 2e 2e 2e 2e 2e 2e | 2e 2e 2e 2e 2e 2e 2e 2e |........|........|
|00000640| 2e 2e 2e 2e 2e 2e 20 20 | 20 20 20 5f 5f 5f 5f 5f |...... | _____|
|00000650| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 0a 20 |________|______. |
|00000660| 20 20 4d 41 54 54 49 41 | 53 20 4f 2e 43 2e 20 42 | MATTIA|S O.C. B|
|00000670| c5 c5 54 48 20 20 20 20 | 20 20 20 20 20 20 20 20 |..TH | |
|00000680| 20 20 7c 22 54 61 62 6c | 6f 69 64 20 52 65 70 6f | |"Tabl|oid Repo|
|00000690| 72 74 65 72 20 20 7c 0a | 20 20 20 20 54 65 6c 65 |rter |.| Tele|
|000006a0| 3a 20 2b 34 36 2d 38 2d | 20 38 37 35 32 32 31 20 |: +46-8-| 875221 |
|000006b0| 20 20 20 20 20 20 20 20 | 20 20 20 7c 69 6e 20 53 | | |in S|
|000006c0| 70 61 63 65 64 6f 75 74 | 20 44 72 65 61 6d 22 7c |pacedout| Dream"||
|000006d0| 0a 20 20 20 20 42 e4 6c | 6c 73 74 61 56 e4 67 65 |. B.l|lstaV.ge|
|000006e0| 6e 20 32 39 39 2c 20 20 | 20 20 20 20 20 20 20 20 |n 299, | |
|000006f0| 20 20 20 20 7c 20 20 20 | 20 20 20 2f 5a 61 6b 20 | | | /Zak |
|00000700| 20 20 20 20 20 20 20 20 | 7c 0a 20 20 20 20 31 36 | ||. 16|
|00000710| 31 20 35 34 20 42 72 6f | 6d 6d 61 20 20 20 20 20 |1 54 Bro|mma |
|00000720| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7c 5f 5f | | |__|
|00000730| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000740| 5f 7c 0a 20 20 20 20 53 | 57 45 44 45 4e 20 20 20 |_|. S|WEDEN |
|00000750| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000760| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 0a 0a 0a | | ...|
|00000770| 0a 0a 0a 44 75 6e 67 65 | 6f 6e 3a 20 58 59 5a 5a |...Dunge|on: XYZZ|
|00000780| 59 2c 20 0a 20 20 20 20 | 20 20 20 20 20 54 68 65 |Y, . | The|
|00000790| 20 64 72 61 67 6f 6e 20 | 77 61 73 20 73 63 61 72 | dragon |was scar|
|000007a0| 65 64 20 62 79 20 61 20 | 62 72 69 64 2e 20 0a 20 |ed by a |brid. . |
|000007b0| 20 20 20 20 20 20 20 20 | 45 78 69 74 73 20 69 6e | |Exits in|
|000007c0| 20 61 6c 6c 20 64 69 72 | 65 63 74 69 6f 6e 73 2e | all dir|ections.|
|000007d0| 0a | |. | |
+--------+-------------------------+-------------------------+--------+--------+